package com.lmy.springCloud.service;

import com.lmy.springCloud.utils.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

@Service
@FeignClient(value = "seata-storage-micro-service-20090")
public interface StorageOpenFeignService {

    /**
     * 远程调用 seata-storage-micro-service-20090 服务的 reduce方法
     * @param productId 商品id
     * @param nums 数量
     * @return
     */
    @PostMapping(value = "/storage/reduce")
    public Result reduce(@RequestParam(value = "productId") Long productId, @RequestParam(value = "nums")Integer nums);
}
